﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true"
    CodeBehind="TechnologyReservation.aspx.cs" Inherits="Corsat.Web._2013.TechnologyReservation" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            text-align: center;
        }
        .progressBackgroundFilter
        {
            position: fixed;
            top: 0px;
            bottom: 0px;
            left: 0px;
            right: 0px;
            overflow: hidden;
            padding: 0;
            margin-left: auto;
            margin-right: auto;
            background-color: #000;
            filter: alpha(opacity=50);
            opacity: 0.5;
            z-index: 1000;
        }
        
        .processMessage
        {
            margin-left: auto;
            margin-right: auto;
            position: fixed;
            top: 30%;
            left: 43%;
            padding: 10px;
            width: 14%;
            z-index: 1001;
            background-color: #fff;
            border: solid 1px #000;
            text-align: center;
        }
        
        .modalBackground
        {
            background-color: Gray;
            filter: alpha(opacity=70);
            opacity: 0.7;
        }
        
        .modalPopup
        {
            background-color: #ffffdd;
            border-width: 3px;
            border-style: solid;
            border-color: Gray;
            padding: 3px;
            width: 400px;
        }
        
        .modalPopup p
        {
            padding: 5px;
        }
    </style>
    <script src="http://localhost:1637/Scripts/JScript.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function returnString(x) {
            document.getElementById("HiddenField1").value = x;
            return true;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <style type="text/css">
        .progressBackgroundFilter
        {
            position: fixed;
            top: 0px;
            bottom: 0px;
            left: 0px;
            right: 0px;
            overflow: hidden;
            padding: 0;
            margin-left: auto;
            margin-right: auto;
            background-color: #000;
            filter: alpha(opacity=50);
            opacity: 0.5;
            z-index: 1000;
        }
        
        .processMessage
        {
            margin-left: auto;
            margin-right: auto;
            position: fixed;
            top: 30%;
            left: 43%;
            padding: 10px;
            width: 14%;
            z-index: 1001;
            background-color: #fff;
            border: solid 1px #000;
            text-align: center;
        }
    </style>
    <asp:ScriptManager ID="formScriptManager" runat="server">
    </asp:ScriptManager>
    <div id="mainDiv" runat="server" dir="rtl">
        <asp:HiddenField ID="HiddenField1" runat="server" ClientIDMode="Static" />
        <asp:UpdateProgress ID="UpdateProgress1" runat="server">
            <ProgressTemplate>
                <div class="progressBackgroundFilter">
                </div>
                <div class="processMessage">
                    جارى التحميل...<br />
                    <br />
                    <img alt="Loading..." src="Images/Loading.gif" />
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
        <asp:UpdatePanel ID="upCourseLevels" runat="server">
            <ContentTemplate>
                <table dir="rtl">
                    <tr>
                        <td>
                            <asp:Label ID="lblCourse" runat="server" Text="الكورس" />
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlCourseNames" runat="server" OnSelectedIndexChanged="ddlCourseNames_SelectedIndexChanged"
                                AutoPostBack="true" />
                        </td>
                        <td>
                            <asp:Label ID="lblDate" runat="server" Text="التاريخ" />
                        </td>
                        <td>
                            <%-- <asp:Calendar ID="dtpDate" runat="server" OnSelectionChanged="dtpDate_SelectionChanged">
                        <SelectedDayStyle BackColor="#0066FF" Font-Bold="True" ForeColor="White" />
                    </asp:Calendar>--%>
                            <asp:DropDownList ID="ddlExamDates" runat="server" OnSelectedIndexChanged="ddlExamDates_SelectedIndexChanged"
                                AutoPostBack="True">
                                <%--<asp:ListItem Text="" Value="" />
                        <asp:ListItem Text="26 يوليو" Value="7/26/2013" />
                        <asp:ListItem Text="27 يوليو" Value="7/27/2013" />
                        <asp:ListItem Text="28 يوليو" Value="7/28/2013" />
                        <asp:ListItem Text="29 يوليو" Value="7/29/2013" />
                        <asp:ListItem Text="30 يوليو" Value="7/30/2013" />
                        <asp:ListItem Text="31 يوليو" Value="7/31/2013" />
                        <asp:ListItem Text="31 يوليو" Value="7/31/2013" />
                        <asp:ListItem Text="2 أغسطس" Value="8/2/2013" />
                        <asp:ListItem Text="3 أغسطس" Value="8/3/2013" />
                        <asp:ListItem Text="4 أغسطس" Value="8/4/2013" />
                        <asp:ListItem Text="5 أغسطس" Value="8/5/2013" />
                        <asp:ListItem Text="6 أغسطس" Value="8/6/2013" />
                        <asp:ListItem Text="7 أغسطس" Value="8/7/2013" />
                        <asp:ListItem Text="8 أغسطس" Value="8/8/2013" />
                        <asp:ListItem Text="9 أغسطس" Value="8/9/2013" />--%>
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
                <table id="table1" runat="server" style="width: 100%;" border="1">
                    <tr>
                        <td class="style1">
                            &nbsp;
                        </td>
                        <td class="style1">
                            معمل A
                        </td>
                        <td class="style1">
                            معمل B
                        </td>
                        <td class="style1">
                            معمل C
                        </td>
                        <td class="style1">
                            معمل D
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            الفترة 1
                            <br />
                            من الساعة 10 - 11 ص
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnA1" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('A1');" />
                            <%--showModalPopupViaClient(event,'programmaticModalPopupBehavior_AlreadyRegistered'); " />--%>
                            <br />
                            <asp:Label ID="lblA1State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnB1" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('B1');" />
                            <br />
                            <asp:Label ID="lblB1State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnC1" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('C1');" />
                            <br />
                            <asp:Label ID="lblC1State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnD1" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('D1');" />
                            <br />
                            <asp:Label ID="lblD1State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            الفترة 2
                            <br />
                            من الساعة 11 - 12 ظ
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnA2" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('A2');" />
                            <br />
                            <asp:Label ID="lblA2State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnB2" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('B2');" />
                            <br />
                            <asp:Label ID="lblB2State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnC2" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('C2');" />
                            <br />
                            <asp:Label ID="lblC2State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnD2" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('D2');" />
                            <br />
                            <asp:Label ID="lblD2State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            الفترة 3
                            <br />
                            من الساعة 12 - 1 ظ
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnA3" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('A3');" />
                            <br />
                            <asp:Label ID="lblA3State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnB3" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('B3');" />
                            <br />
                            <asp:Label ID="lblB3State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnC3" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('C3');" />
                            <br />
                            <asp:Label ID="lblC3State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnD3" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('D3');" />
                            <br />
                            <asp:Label ID="lblD3State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            الفترة 4
                            <br />
                            من الساعة 1 - 2 ظ
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnA4" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('A4');" />
                            <br />
                            <asp:Label ID="lblA4State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnB4" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('B4');" />
                            <br />
                            <asp:Label ID="lblB4State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnC4" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('C4');" />
                            <br />
                            <asp:Label ID="lblC4State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnD4" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('D4');" />
                            <br />
                            <asp:Label ID="lblD4State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                    </tr>
                    
                    <tr>
                        <td class="style1">
                            الفترة 5
                            <br />
                            من الساعة 2 - 3 ظ
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnA5" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('A5');" />
                            <br />
                            <asp:Label ID="lblA5State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnB5" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('B5');" />
                            <br />
                            <asp:Label ID="lblB5State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnC5" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('C5');" />
                            <br />
                            <asp:Label ID="lblC5State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnD5" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('D5');" />
                            <br />
                            <asp:Label ID="lblD5State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                    </tr>

                    <tr>
                        <td class="style1">
                            الفترة 6
                            <br />
                            من الساعة 3 - 4 ظ
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnA6" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('A6');" />
                            <br />
                            <asp:Label ID="lblA6State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnB6" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('B6');" />
                            <br />
                            <asp:Label ID="lblB6State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnC6" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('C6');" />
                            <br />
                            <asp:Label ID="lblC6State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnD6" runat="server" Text="حجز" OnClick="ReserveCourse" OnClientClick="returnString('D6');" />
                            <br />
                            <asp:Label ID="lblD6State" runat="server" Text="حجز حتى الآن .. 0" />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="ddlCourseNames" EventName="SelectedIndexChanged" />
                <asp:AsyncPostBackTrigger ControlID="ddlExamDates" EventName="SelectedIndexChanged" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
    <asp:Button runat="server" ID="hiddenTargetControlForModalPopup" Style="display: none" />
    <ajaxToolkit:ModalPopupExtender runat="server" ID="programmaticModalPopup_RegistrationResult"
        BehaviorID="programmaticModalPopupBehavior_RegistrationResult" PopupControlID="pnlRegistrationResult"
        TargetControlID="hiddenTargetControlForModalPopup" BackgroundCssClass="modalBackground"
        DropShadow="True" PopupDragHandleControlID="programmaticPopupDragHandle_RegistrationResult"
        RepositionMode="RepositionOnWindowScroll">
    </ajaxToolkit:ModalPopupExtender>
    <asp:Panel ID="pnlRegistrationResult" runat="server" CssClass="modalPopup" Style="display: none;">
        <asp:Panel runat="Server" ID="programmaticPopupDragHandle_RegistrationResult" Style="cursor: move;
            background-color: #DDDDDD; border: solid 1px Gray; color: Black; text-align: center;">
            <b>الكورسات المتخصصة</b>
        </asp:Panel>
        <br />
        <asp:Label ID="lblAccountNumber" runat="server" Style="font-size: x-large; color: Green;"
            Text="تم الحجز بنجاح"></asp:Label>
        <br />
        <div dir="rtl">
            <asp:Label ID="lblMessageData" runat="server" Style="font-size: large;"></asp:Label>
        </div>
        <asp:Label ID="lblTechReserveCode" runat="server" Style="font-size: large;"></asp:Label>
        <br />
        <a id="hideModalPopupViaClientButton" href="#" onclick="hideModalPopupViaClient(event,'programmaticModalPopupBehavior_RegistrationResult')"
            style="font-size: medium;">إغلاق النافذة</a>
    </asp:Panel>
    <asp:Button runat="server" ID="btnHiddenAlreadyRegistered" Style="display: none" />
    <ajaxToolkit:ModalPopupExtender runat="server" ID="programmaticModalPopup_AlreadyRegistered"
        BehaviorID="programmaticModalPopupBehavior_AlreadyRegistered" TargetControlID="btnHiddenAlreadyRegistered"
        PopupControlID="pnlAlreadyRegistered" BackgroundCssClass="modalBackground" DropShadow="True"
        PopupDragHandleControlID="programmaticPopupDragHandle_AlreadyRegistered" RepositionMode="RepositionOnWindowScroll">
    </ajaxToolkit:ModalPopupExtender>
    <asp:Panel ID="pnlAlreadyRegistered" runat="server" CssClass="modalPopup" Style="display: none;
        text-align: center;">
        <asp:Panel runat="Server" ID="programmaticPopupDragHandle_AlreadyRegistered" Style="cursor: move;
            background-color: #DDDDDD; border: solid 1px Gray; color: Black; text-align: center;
            height: 30px; vertical-align: middle;">
            <a id="A2" href="#" onclick="hideModalPopupViaClient(event,'programmaticModalPopupBehavior_AlreadyRegistered')">
                <img src="Images/Action-cancel-icon.png" align="left" alt="إغلاق النافذة" width="30px"
                    height="30px" /></a>
            <asp:Label ID="lblModalHeader" runat="server" Style="vertical-align: middle;" Text="الكورسات المتخصصة"
                Font-Size="X-Large" Font-Bold="True"></asp:Label>
        </asp:Panel>
        <asp:Label ID="Label1" runat="server" Style="font-size: large" Text="من فضلك ادخل الرقم الكورساني"></asp:Label>
        <br />
        <asp:TextBox ID="txtAccountCorsatId" runat="server" Width="80%" Style="font-size: x-large;
            text-align: center;" onkeypress="return isNumberKey(event) && ValidateTextLength('txtAccountCorsatId',4);"
            OnTextChanged="txtAccountCorsatId_TextChanged" AutoPostBack="true" />
        <br />
        <asp:UpdatePanel ID="upnlAccount" runat="server">
            <ContentTemplate>
                <asp:Label ID="lblAccountName" runat="server" Style="font-size: large;"></asp:Label>
                <asp:HiddenField ID="hfAccountId" runat="server" />
                <%--<asp:LinkButton ID="btnCheckAccount" runat="server" OnClick="btnCheckAccount_Click"/>--%>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="txtAccountCorsatId" EventName="TextChanged" />
            </Triggers>
        </asp:UpdatePanel>
        <br />
        <asp:LinkButton runat="server" ID="btnReserveTechnologyCourse" CommandName="ReserveTechnologyCourse"
            CommandArgument='document.getElementById("HiddenField1").value' OnClick="btnReserveTechnologyCourse_Click"
            Text="حـــجـــز" Font-Bold="true" Font-Size="Large" />
    </asp:Panel>
</asp:Content>
